<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js行内式</title>
    <script>
        function  fun() {
            alert("啊哈哈哈");
        }
    </script>
</head>
<body>
<button onclick="alert('123')">点击我</button>
<button onclick="fun();">点击我啊</button>
</body>
</html>